﻿<Window x:Class="TweensLib4WPFTest.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="MainWindow" Height="350" Width="525">
    <Grid Name="gd_all">        
        
        <Rectangle Name="myRectangle" Height="100"  Width="100" Fill="LightBlue"/>
        <Button Height="23" HorizontalAlignment="Left" Margin="12,247,0,0" Name="button1" VerticalAlignment="Top" Width="75" Click="button1_Click" >
                A button
            <Button.Triggers>
                <EventTrigger RoutedEvent="Button.Click">
                    <BeginStoryboard>
                        <Storyboard>
                            <DoubleAnimation 
                                Storyboard.TargetName="myRectangle"
                                Storyboard.TargetProperty="Opacity" 
                                From="1" To="0" Duration="0:0:1" AutoReverse="True" />
                        </Storyboard>
                    </BeginStoryboard>
                </EventTrigger>
            </Button.Triggers>
        </Button>
        <Button Content="Button" Height="23" HorizontalAlignment="Left" Margin="12,276,0,0" Name="button2" VerticalAlignment="Top" Width="75" Click="button2_Click" />
    </Grid>
</Window>
